<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <script src="https://unpkg.com/vue@next"></script>
</head>
<body>
  <div id="root"></div>
  <script>
    //Non-props属性
    const app=Vue.createApp({
      data(){
        return{

        }
      },
      template:`<div><counter style="color:red" msg="hello" msg2="aa"/></div>`
    })
    app.component('counter',{
      // inheritAttrs:false,
      mounted(){
        console.log(this.$attrs.msg);
      },
      template:`
        <div>counter</div>
        <div v-bind:msg="$attrs.msg">counter</div>
        <div :msg2="$attrs.msg2">counter</div>`
    })
    const vm=app.mount('#root')
  </script>
</body>
</html>